from django.conf.urls import url
from .views import viewsIndex,viewsUsers,viewsCates,viewsGoods
urlpatterns = [
    # 首页
    url(r'^$',viewsIndex.index,name='myadmin_index'),

    # 登录
    url(r'^login/$',viewsIndex.login,name="myadmin_login"),
    url(r'^loginout/$',viewsIndex.loginout,name="myadmin_loginout"),
    url(r'^verifycode/$',viewsIndex.verifycode,name="myadmin_code"),

    # 用户管理
    url(r'^add/$',viewsUsers.useradd,name='myadmin_user_add'),
    url(r'^userlist/$',viewsUsers.userlist,name='myadmin_user_list'),
    url(r'^dell/([0-9]+)/$',viewsUsers.dell,name='myadmin_user_dell'),
    url(r're/([0-9]+)/$',viewsUsers.re,name='myadmin_user_re'),

    # 商品分类
    url(r'^cates/add/$',viewsCates.catesadd,name='myadmin_cates_add'),
    url(r'^cates/list/$',viewsCates.cateslist,name='myadmin_cates_list'),
    url(r'^cates/del/$', viewsCates.catesdel,name="myadmin_cates_del"),
    url(r'^cates/re/$', viewsCates.catesre,name="myadmin_cates_re"),

    # 商品管理
    url(r'^goods/add/$',viewsGoods.goodsadd,name='myadmin_goods_add'),
    url(r'^goods/insert/$',viewsGoods.goodsinsert,name='myadmin_goods_insert'),
    url(r'^goods/list/$', viewsGoods.goodslist,name="myadmin_goods_list"),
    url(r'^goods/re/$',viewsGoods.goodsre,name='myadmin_goods_re'),
    url(r'^goods/dell/$',viewsGoods.goodsdell,name='myadmin_goods_dell'),
]
